module(
    name = "rules_web_testing_scala",
    version = "0.4.1",
)

bazel_dep(
    name = "rules_webtesting",
    version = "0.4.1",
)

local_path_override(
    module_name = "rules_webtesting",
    path = "..",
)

bazel_dep(
    name = "rules_web_testing_java",
)

local_path_override(
    module_name = "rules_web_testing_java",
    path = "../web_testing_java",
)

bazel_dep(
    name = "bazel_skylib",
    version = "1.7.1",
)

##### Scala dependencies #####
bazel_dep(
    name = "rules_scala",
    repo_name = "io_bazel_rules_scala",
)

# TODO: Switch to a release version once it's available in BCR.
# Otherwise, the root module has to declare the same override.
git_override(
    module_name = "rules_scala",
    commit = "219e63983e8e483e66ebf70372969ba227382001",
    remote = "https://github.com/mbland/rules_scala",
)

scala_deps = use_extension(
    "@io_bazel_rules_scala//scala/extensions:deps.bzl",
    "scala_deps",
)

scala_deps.settings(
    fetch_sources = True,
)

scala_deps.toolchains(
    scalatest = True,
)

##### Java dependencies #####
bazel_dep(
    name = "rules_jvm_external",
    version = "6.6",
)

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
    artifacts = [
        "com.google.guava:guava:33.2.1-jre",
        "org.seleniumhq.selenium:selenium-remote-driver:4.27.0",
        "org.seleniumhq.selenium:selenium-api:4.27.0",
        "junit:junit:4.13.2",
    ],
)

use_repo(maven, "maven")
